import request from '@/utils/request.js';

// 用户接口信息

// 登录
export const userLogin = (userLoginDto) => {
    return request.post(`/user/login`, userLoginDto);
};

// 注册
export const userRegister = (userReigsterDto) => {
    return request.post(`/user/register`, userReigsterDto);
};
// 删除
export const userDelete = (id) => {
    return request.delete(`/user/delete/${id}`)
}
// 更新
export const userUpdate = (user) => {
    return request.put(`/user/update`, user);
};

// 发送验证码
export const codeSend = (phoneNumber) => {
    return request.get('/msg', { params: { phoneNumber: phoneNumber } });
}


export const getUserInfoApi = () => {
    return request.get('/user/info');
}

export const updateUserInfoApi = (param) => {
    return request.get('/user/system',{ params: { url: param} });
}